<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹性子元素伸缩</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul {
            list-style: none;
            width: 800px;
            text-align: center;
            font-size: 20px;
            font-weight: bold;
            border: 10px solid red;
            display: flex;
            flex-flow: row nowrap;
        }

        li{
            width: 100px;
            line-height: 100px;
            /* flex: 1 1 auto;  */
        }

        li:nth-child(1) {
            /* 修改弹性子元素自身对齐方式 */
            /* align-self: center; */
            /* 改变弹性子元素顺序, 很有用 ☆  */
            order: 5;
            background-color: #bfa;
        }

        li:nth-child(2) {
            background-color: tomato;
            flex-shrink: 2;
            order: 1;
        }

        li:nth-child(3) {
            background-color: skyblue;
            flex-shrink: 3;
            order: 2;
        }

        li:nth-child(4) {
            background-color: greenyellow;
            flex-shrink: 4;
            order: 4;
        }

        li:nth-child(5) {
            background-color: orchid;
            flex-shrink: 5;
            order: 4;
        }
    </style>
</head>
<body>

<ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
</ul>
</body>
</html>